<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{margin: 0; padding: 0;}
        ul{
            width: 750px;
            border: 1px solid #ccc;
            background: #eee;
            list-style-type: none;
            margin: 100px auto;
            overflow: hidden;
        }
        ul li{
            width: 150px;
            height: 35px;
            line-height: 35px;
            text-align: center;
            float: left;
        }
        ul li a{
            text-decoration: none;
            color: red;
            display: block;
        }
        ul li.active{
            background: green;
        }
    </style>
</head>
<body>
    <ul>
        <li class="active"><a href="#">首页</a></li>
        <li><a href="#">首页</a></li>
        <li><a href="#">首页</a></li>
        <li><a href="#">首页</a></li>
        <li><a href="#">首页</a></li>
    </ul>
</body>
</html>
<script src="js/jquery-1.10.1.js"></script>
<script>
    $(function () {
        $("ul li").click(function () {
            $(this).addClass("active").siblings().removeClass("active");
        })
    })
</script>